package com.pig4cloud.ila.platform.controller;

import com.baomidou.mybatisplus.core.toolkit.Wrappers;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.pig4cloud.ila.client.api.entity.Article;
import com.pig4cloud.ila.platform.service.WelcomeService;
import com.pig4cloud.pig.common.core.util.R;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import lombok.RequiredArgsConstructor;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @author KonBAI
 * @version 1.0
 * Create by 2020/11/02 12:15
 */
@RestController
@RequiredArgsConstructor
@RequestMapping("/home")
@Api(value = "home", tags = "首页管理")
public class WelcomeController {

    private final WelcomeService welcomeService;

    /**
     * 分页查询
     *
     * @return
     */
    @ApiOperation(value = "分页查询", notes = "分页查询")
    @GetMapping("/getTotalData")
    public R getArticlePage() {
        return R.ok(welcomeService.totalData());
    }
}
